package com.wwz;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.annotation.write.style.HeadStyle;
import com.alibaba.excel.util.StringUtils;
import lombok.Data;
import org.apache.poi.ss.usermodel.HorizontalAlignment;

public class excel {
    /*@Data
    @HeadStyle(shrinkToFit = true)
    @ContentStyle(horizontalAlignment = HorizontalAlignment.CENTER)
    public class CustomerApplyExport {

        @ExcelProperty("客户ID")
        private Long id;

        @ExcelProperty("客户名称")
        private String customerName;

        @ExcelProperty("客户简称")
        private String customerSimpleName;

        @ExcelIgnore
        private Integer customerType;
        @ExcelProperty("客户类型")
        private String customerTypeName;

        @ExcelProperty("所属代理商")
        private String belongAgentName;

        @ExcelIgnore
        private Integer industryCategory;
        @ExcelProperty("行业分类")
        private String industryCategoryName;

        @ExcelProperty("一级行业")
        private String firstIndustryName;

        @ExcelProperty("二级行业")
        private String secondIndustryName;

        @ExcelIgnore
        private Integer newCustomer;
        @ExcelProperty("客户属性")
        private String newCustomerStatus;

        @ExcelIgnore
        private Integer status;
        @ExcelProperty("报备状态")
        private String statusName;

        public String getCustomerTypeName() {
            CustomerTypeEnum customerTypeEnum = CustomerTypeEnum.getByType(customerType);
            return customerTypeEnum != null ? customerTypeEnum.getName() : StringUtils.EMPTY;
        }

        public String getIndustryCategoryName() {
            IndustryTypeEnum typeEnum = IndustryTypeEnum.getByType(industryCategory);
            return typeEnum != null ? typeEnum.getName() : StringUtils.EMPTY;
        }

        public String getNewCustomerStatus() {
            return newCustomer != null && newCustomer == 1 ? "新客户" : "旧客户";
        }

        public String getStatusName() {
            CustomerStatusEnum statusEnum = CustomerStatusEnum.getByType(status);
            return statusEnum != null ? statusEnum.getName() : StringUtils.EMPTY;
        }
    }*/
}
